package com.story.dao;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.dao.DataAccessException;

import com.story.domain.Page;
import com.story.domain.SessionInfo;


public interface ISessionDao {
	void addSession(SessionInfo info) throws DataAccessException;
	void deleteSessionById(String sessionid) throws DataAccessException;
	void updateSessionById(@Param("username")String username,@Param("session")String session,@Param("lastAccessTime")Date lastAccessTime,@Param("sessionid")String sessionid) throws DataAccessException;
	SessionInfo findOneById(String sessionid) throws DataAccessException;
	List<SessionInfo> findSomeById(String sessionid) throws DataAccessException;
	List<SessionInfo> findAll() throws DataAccessException;
	Integer totalCount() throws DataAccessException;
	List<SessionInfo> findSomeByLimit(Page page) throws DataAccessException;
	void updateSessionWithLogout(@Param("quitTime")Date quitTime,@Param("status")Boolean status,@Param("sessionid")String sessionid) throws DataAccessException;
	void updateSessionWithRead(@Param("lastAccessTime")Date lastAccessTime,@Param("sessionid")String sessionid);
}
